#ifndef CONNECTION_H
#define CONNECTION_H

#include <QSqlDatabase>
#include <QSqlQuery>

static void createConnection()
{
    QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
    db.setDatabaseName("test.gdw");
    db.open();
/*
	QSqlQuery query;
    query.exec("create table saturday( id int,subject int,fromTime int,"
     			"toTime int,place int, teacher int)");
    query.exec("create table sunday( id int,subject int,fromTime int,"
     			"toTime int,place int, teacher int)");
    query.exec("create table monday( id int,subject int,fromTime int,"
     			"toTime int,place int, teacher int)");
    query.exec("create table tuesday( id int,subject int,fromTime int,"
     			"toTime int,place int, teacher int)");
    query.exec("create table wednesday( id int,subject int,fromTime int,"
     			"toTime int,place int, teacher int)");
    query.exec("create table thursday( id int,subject int,fromTime int,"
     			"toTime int,place int, teacher int)");
     			     			     			
    query.exec("create table subjects ( id int,name varchar(50))");
    query.exec("create table places ( id int,name varchar(50))");
    query.exec("create table teachers ( id int,name varchar(50))");
    query.exec("create table times ( id int,name varchar(10) )");
    */
}

#endif
